/**
 * Sep 17, 2013 3:38:13 PM
 * com.kratonsolution.belian.kernel.service
 * CRUDService.java
 */
package com.kratonsolution.belian.kernel.service;

import java.util.List;
import java.util.Map;

import com.kratonsolution.belian.kernel.dm.Model;

/**
 * @author Agung Dodi Perdana
 * @email agung.dodi.perdana@gmail.com
 * @Version Sinch 0.0.1
 */
public interface CRUDService<T extends Model>
{
    public T store(String email,T model);
    
    public T load(String email,String id);
    
    public T update(String email,T model);
    
    public T remove(String email,T model);
    
    public List<T> loads(String email);
    
    /**
     * Load all available data with paging support
     * @param java.util.Map implementation
     * @return java.util.Map
     * return Map contains
     * - List of data
     * - page : Number of page
     * - param : Method parameter
     */
    public Map<String,Object> loads(String email,Map<String,Object> param);
}
